<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>m4.include/mc-cflags.m4</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/m4.include.html'>m4.include</a>/mc-cflags.m4</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/m4.include.html'>m4.include</a>/mc-cflags.m4</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 m4.include/mc-cflags.m4'  /> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>dnl @synopsis mc_CHECK_CFLAGS
<a id='L2' name='L2'></a>dnl
<a id='L3' name='L3'></a>dnl Check flags supported by C compiler
<a id='L4' name='L4'></a>dnl
<a id='L5' name='L5'></a>dnl @author Slava Zanko &lt;slavazanko@gmail.com&gt;
<a id='L6' name='L6'></a>dnl @version 2013-01-16
<a id='L7' name='L7'></a>dnl @license GPL
<a id='L8' name='L8'></a>dnl @copyright Free Software Foundation, Inc.
<a id='L9' name='L9'></a> 
<a id='L10' name='L10'></a>AC_DEFUN([mc_CHECK_ONE_CFLAG],[
<a id='L11' name='L11'></a> 
<a id='L12' name='L12'></a>  AC_MSG_CHECKING([whether ${CC} accepts $1])
<a id='L13' name='L13'></a> 
<a id='L14' name='L14'></a>  safe_CFLAGS=$CFLAGS
<a id='L15' name='L15'></a> 
<a id='L16' name='L16'></a>  case "$CC" in
<a id='L17' name='L17'></a>    clang*)
<a id='L18' name='L18'></a>      CFLAGS="-Werror $1"
<a id='L19' name='L19'></a>      ;;
<a id='L20' name='L20'></a>    *)
<a id='L21' name='L21'></a>      CFLAGS="$1"
<a id='L22' name='L22'></a>      ;;
<a id='L23' name='L23'></a>  esac
<a id='L24' name='L24'></a> 
<a id='L25' name='L25'></a>  AC_COMPILE_IFELSE(
<a id='L26' name='L26'></a>    [AC_LANG_PROGRAM([], [[return 0;]])],
<a id='L27' name='L27'></a>    [mc_check_one_cflag=yes],
<a id='L28' name='L28'></a>    [mc_check_one_cflag=no])
<a id='L29' name='L29'></a> 
<a id='L30' name='L30'></a>  CFLAGS=$safe_CFLAGS
<a id='L31' name='L31'></a>  AC_MSG_RESULT([$mc_check_one_cflag])
<a id='L32' name='L32'></a> 
<a id='L33' name='L33'></a>  if test x$mc_check_one_cflag = xyes; then
<a id='L34' name='L34'></a>    mc_configured_cflags="$mc_configured_cflags $1"
<a id='L35' name='L35'></a>  fi
<a id='L36' name='L36'></a>])
<a id='L37' name='L37'></a> 
<a id='L38' name='L38'></a>AC_DEFUN([mc_CHECK_CFLAGS],[
<a id='L39' name='L39'></a>    AC_LANG_PUSH(C)
<a id='L40' name='L40'></a> 
<a id='L41' name='L41'></a>    mc_configured_cflags=""
<a id='L42' name='L42'></a> 
<a id='L43' name='L43'></a>dnl Sorted -f options:
<a id='L44' name='L44'></a>dnl AC_MSG_CHECKING([CC is $CC])
<a id='L45' name='L45'></a>case "$CC" in
<a id='L46' name='L46'></a>  gcc*)
<a id='L47' name='L47'></a>    mc_CHECK_ONE_CFLAG([-fdiagnostics-show-option])
<a id='L48' name='L48'></a>dnl    mc_CHECK_ONE_CFLAG([-fno-stack-protector])
<a id='L49' name='L49'></a>    ;;
<a id='L50' name='L50'></a>  *)
<a id='L51' name='L51'></a>    ;;
<a id='L52' name='L52'></a>esac
<a id='L53' name='L53'></a> 
<a id='L54' name='L54'></a>dnl Sorted -W options:
<a id='L55' name='L55'></a>    mc_CHECK_ONE_CFLAG([-Wassign-enum])
<a id='L56' name='L56'></a>    mc_CHECK_ONE_CFLAG([-Wbad-function-cast])
<a id='L57' name='L57'></a>    mc_CHECK_ONE_CFLAG([-Wcomment])
<a id='L58' name='L58'></a>    mc_CHECK_ONE_CFLAG([-Wconditional-uninitialized])
<a id='L59' name='L59'></a>    mc_CHECK_ONE_CFLAG([-Wdeclaration-after-statement])
<a id='L60' name='L60'></a>    mc_CHECK_ONE_CFLAG([-Wfloat-conversion])
<a id='L61' name='L61'></a>    mc_CHECK_ONE_CFLAG([-Wfloat-equal])
<a id='L62' name='L62'></a>    mc_CHECK_ONE_CFLAG([-Wformat])
<a id='L63' name='L63'></a>    mc_CHECK_ONE_CFLAG([-Wformat-security])
<a id='L64' name='L64'></a>    mc_CHECK_ONE_CFLAG([-Wformat-signedness])
<a id='L65' name='L65'></a>    mc_CHECK_ONE_CFLAG([-Wimplicit])
<a id='L66' name='L66'></a>    mc_CHECK_ONE_CFLAG([-Wimplicit-fallthrough])
<a id='L67' name='L67'></a>    mc_CHECK_ONE_CFLAG([-Wignored-qualifiers])
<a id='L68' name='L68'></a>    mc_CHECK_ONE_CFLAG([-Wlogical-not-parentheses])
<a id='L69' name='L69'></a>    mc_CHECK_ONE_CFLAG([-Wmaybe-uninitialized])
<a id='L70' name='L70'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-braces])
<a id='L71' name='L71'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-declarations])
<a id='L72' name='L72'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-field-initializers])
<a id='L73' name='L73'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-format-attribute])
<a id='L74' name='L74'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-parameter-type])
<a id='L75' name='L75'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-prototypes])
<a id='L76' name='L76'></a>    mc_CHECK_ONE_CFLAG([-Wmissing-variable-declarations])
<a id='L77' name='L77'></a>    mc_CHECK_ONE_CFLAG([-Wnested-externs])
<a id='L78' name='L78'></a>    mc_CHECK_ONE_CFLAG([-Wno-long-long])
<a id='L79' name='L79'></a>    mc_CHECK_ONE_CFLAG([-Wno-unreachable-code])
<a id='L80' name='L80'></a>    mc_CHECK_ONE_CFLAG([-Wparentheses])
<a id='L81' name='L81'></a>    mc_CHECK_ONE_CFLAG([-Wpointer-arith])
<a id='L82' name='L82'></a>    mc_CHECK_ONE_CFLAG([-Wpointer-sign])
<a id='L83' name='L83'></a>    mc_CHECK_ONE_CFLAG([-Wredundant-decls])
<a id='L84' name='L84'></a>    mc_CHECK_ONE_CFLAG([-Wreturn-type])
<a id='L85' name='L85'></a>    mc_CHECK_ONE_CFLAG([-Wsequence-point])
<a id='L86' name='L86'></a>    mc_CHECK_ONE_CFLAG([-Wshadow])
<a id='L87' name='L87'></a>    mc_CHECK_ONE_CFLAG([-Wsign-compare])
<a id='L88' name='L88'></a>dnl  mc_CHECK_ONE_CFLAG([-Wstrict-aliasing])
<a id='L89' name='L89'></a>    mc_CHECK_ONE_CFLAG([-Wstrict-prototypes])
<a id='L90' name='L90'></a>    mc_CHECK_ONE_CFLAG([-Wswitch])
<a id='L91' name='L91'></a>    mc_CHECK_ONE_CFLAG([-Wswitch-default])
<a id='L92' name='L92'></a>    mc_CHECK_ONE_CFLAG([-Wtype-limits])
<a id='L93' name='L93'></a>    mc_CHECK_ONE_CFLAG([-Wundef])
<a id='L94' name='L94'></a>    mc_CHECK_ONE_CFLAG([-Wuninitialized])
<a id='L95' name='L95'></a>    mc_CHECK_ONE_CFLAG([-Wunreachable-code])
<a id='L96' name='L96'></a>    mc_CHECK_ONE_CFLAG([-Wunused-but-set-variable])
<a id='L97' name='L97'></a>    mc_CHECK_ONE_CFLAG([-Wunused-function])
<a id='L98' name='L98'></a>    mc_CHECK_ONE_CFLAG([-Wunused-label])
<a id='L99' name='L99'></a>    mc_CHECK_ONE_CFLAG([-Wunused-parameter])
<a id='L100' name='L100'></a>    mc_CHECK_ONE_CFLAG([-Wunused-result])
<a id='L101' name='L101'></a>    mc_CHECK_ONE_CFLAG([-Wunused-value])
<a id='L102' name='L102'></a>    mc_CHECK_ONE_CFLAG([-Wunused-variable])
<a id='L103' name='L103'></a>    mc_CHECK_ONE_CFLAG([-Wwrite-strings])
<a id='L104' name='L104'></a> 
<a id='L105' name='L105'></a>    AC_LANG_POP()
<a id='L106' name='L106'></a>])
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+106 m4.include/mc-cflags.m4'  /> */</em>
</body>
</html>
